pub fn dp_rec_mc(amount: u32) -> u32 {
    // TODO: 这里写逻辑
    //todo!()
    let face_values: Vec<u32> = vec![1, 2, 5, 10, 20, 30, 50, 100];
    let mut amount = amount;
    let mut time = 0;
    let mut divider = find_face_value(&face_values, amount, false);
    let mut remaind = amount % divider;

    while remaind > 0 {
        if amount / divider > 0 {
            time = time + amount / divider;
            amount = remaind;
            divider = find_face_value(&face_values, remaind, false);
            remaind = amount % divider;
        } else {
            divider = find_face_value(&face_values, divider, true);
            remaind = amount % divider;
        }
    }
    // divider = find_face_value(&face_values, remaind);
    if remaind == 0 {
        time = time + amount / divider;
    }

    time
}

fn find_face_value(values: &Vec<u32>, val: u32, is_face_val: bool) -> u32 {
    let tmp = values.clone();
    let max_value = *tmp.get(values.len() - 1).unwrap();
    let f = tmp
        .into_iter()
        .filter(|i| (!is_face_val && *i >= val) || (is_face_val && *i < val))
        .collect::<Vec<u32>>();
    if f.len() == 0 {
        max_value
    } else {
        *(f.get(f.len() - 1).unwrap())
    }
}
